//# sourceURL=bigscreen.js
/**
 * Created by lhassy on 2016/12/28.
 */
var bigscreen = function () {

    var setIntervalID = 0;
    var fontcolor = "white";

    function GetET() {
        $.ajax({
            type: "POST",
            url: backServerUrl + "api/auth/token",
            dataType: "json",
            headers: {
                'Content-Type': 'application/json'
            },
            success: function (data) {

            },
            error: function () {

            }
        });
    }
    //借书排行榜 3
    function BorrowCount() {
        var myChart2 = echarts.init(document.getElementById('chartborrow'));
        option = {
            title: {
                // text:"借阅排行榜",
                // textStyle:{
                //    color:"#64879c" 
                // }
                top: 0
            },
            legend: {
                data: ['借阅次数'],
                show: false
            },
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                    label: {
                        backgroundColor: '#6a7985'
                    }
                }
            },
            xAxis: {
                type: 'category',
                boundaryGap: false,
                // axisLabel: {
                //     textStyle: {
                //         color: '#FFFFFF'
                //     }
                // },
                axisLine: {
                    lineStyle: {
                        color: '#ffffff' //设置x轴颜色
                    }
                },
                axisLabel: {
                    interval: 0,
                    rotate: -45, //倾斜度 -90 至 90 默认为0  
                    margin: 10,
                    formatter: function (value) {
                        var str = new String(value);
                        var bytesCount = 0;
                        var s = "";
                        for (var i = 0, n = str.length; i < n; i++) {
                            var c = str.charCodeAt(i);
                            //统计字符串的字符长度
                            if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
                                bytesCount += 1;
                            } else {
                                bytesCount += 2;
                            }
                            //换行
                            s += str.charAt(i);
                            if (bytesCount >= 18) {
                                s = s + '\n';
                                //重置
                                bytesCount = 0;
                            }
                        }
                        return s;
                    }
                },
                //data : ['全世界优等生都在做的1000个思维游戏','小王子','血腥的盛唐','红楼梦','一千零一夜','水浒传','中华上下五千年','理解孩子四到五岁']
                //data : ['	30年后，你拿什么养活自己？','小王子','娶个偶像当老公','红楼梦','你若安好便是晴天——林徽因传','水浒传','中华上下五千年','父与子全集']
                //data : ['Color Me 选对色彩穿对衣（新版）','杜拉拉大结局：与理想有关','	蔡康永的说话之道','图解麻衣神相：第一部','你若安好便是晴天——林徽因传','希利尔讲世界史','中华上下五千年','好妈妈胜过好老师']
                //data : ['活到天年——秘传全中国的养生祛病大法','游戏力——会玩儿的父母大智慧','	蔡康永的说话之道','	卓有成效的管理者','从零开始学K线','每天学点职场心理学','生命喜悦的祈祷','好妈妈胜过好老师']
                data: ['敌营十八年之尝胆卧心', '仓央嘉措', '杜月笙大传', '女人必读的男人心理学', '从零开始学K线', '向脾胃要健康', '生命喜悦的祈祷', '女人不狠，地位不稳']
                //data : ['重遇未知的自己：爱上生命中的不完美','女人优雅一生的装扮课','不上火的生活','脸要穷养，身要娇养','从零开始学K线','向脾胃要健康','态度决定健康','正面管教']
            },
            grid: {
                bottom: 100,
                right: 80
            },
            yAxis: {
                type: 'value',
                name: '借阅次数',
                nameGap: 30,
                // axisLabel: {
                //     textStyle: {
                //         color: '#FFFFFF'
                //     }
                // },
                axisLine: {
                    lineStyle: {
                        color: '#ffffff' //设置x轴颜色
                    }
                },
            },
            series: [{
                name: '借阅次数',
                type: 'line',
                stack: '总量',
                markPoint: {
                    data: [{
                            type: 'max',
                            name: '最大值'
                        },
                        {
                            type: 'min',
                            name: '最小值'
                        }
                    ]
                },
                itemStyle: {
                    normal: {
                        // color:"rgb(26,64,84)"
                        color: "#4fc0f5"
                    }
                },
                lineStyle: {
                    normal: {
                        color: "#4fc0f5"
                    }
                },
                areaStyle: {
                    normal: {
                        color: "#0f6cdc"
                    },
                    shadowColor: '#0f6cdc'
                },
                data: [230, 210, 132, 134, 120, 101, 90, 20]
            }]
        };

        myChart2.setOption(option);
        window.onresize = myChart2.resize;
    }
    //读者排行榜
    function ReaderCount() {
        var et = window.localStorage["et"];
        var backServerUrl = window.localStorage["backServerUrl"];
        var startTime = "2016-07-11";
        var endTime = "2016-08-20";
        var limit = 10;
        $.ajax({
            type: "get",
            url: backServerUrl + "api/statistics/jh?start=" + startTime + "T00:00:01.001&end=" + endTime + "T23:59:59.001&interval=1m&top=" + limit + "&device_alias=&source=false&aggregation=operation__reader_name",
            dataType: "json",
            headers: {
                'Content-Type': 'application/json',
                'Authorization': et
            },
            beforeSend: function () {
                // $("#countreportbutton").addClass("breath_light");
            },
            complete: function () {
                // $("#countreportbutton").removeClass("breath_light");
            },
            success: function (data) {
                var tableCount = "";
                var bu = null;

                //按读者
                var xCategories = [];
                var borrowData = [];

                for (var i in data.aggregations.operation.buckets) {
                    if (data.aggregations.operation.buckets[i].key === "borrow")
                        bu = data.aggregations.operation.buckets[i].reader_id.buckets;
                }
                if (bu == null) {
                    alert("该段时间内没有数据!");
                    return;
                }
                for (var i in bu) {
                    xCategories.push(bu[i].reader_name.hits.hits[0]._source.reader_name);
                    borrowData.push(bu[i].doc_count);
                }

                //按读者
                $('#chartreader').highcharts({
                    colors: ['#4568D9', '#7FB451', '#DDDF00'],
                    chart: {
                        type: 'column',
                        // options3d: {
                        //     enabled: true,
                        //     alpha: 2,
                        //     beta: 2,
                        //     viewDistance: 25,
                        //     depth: 20
                        // },
                        backgroundColor: 'rgba(0,0,0,0)'
                    },
                    credits: {
                        enabled: false
                    },
                    title: {
                        text: '读者排行榜',
                        style: {
                            'fontSize': '18px',
                            'color': fontcolor
                        }
                    },
                    legend: {
                        enabled: false
                    },
                    exporting: {
                        enabled: false
                    },
                    xAxis: {
                        categories: xCategories,
                        labels: {
                            style: {
                                'color': fontcolor
                            }
                        }
                    },
                    yAxis: {
                        allowDecimals: false,
                        title: {
                            text: '借阅次数',
                            style: {
                                'fontSize': '18px',
                                'color': fontcolor
                            }
                        },
                        labels: {
                            style: {
                                'color': fontcolor
                            }
                        }
                    },
                    plotOptions: {
                        series: {
                            borderWidth: 0,
                            colorByPoint: true,
                            dataLabels: {
                                enabled: true,
                                format: '{point.y}',
                                style: {
                                    'color': fontcolor
                                }
                            }
                        }
                    },
                    // exporting: { enabled: false },
                    series: [{
                        name: '借阅次数',
                        data: borrowData
                    }]
                });
            }
        });
    }
    //借书还书柱状图 5
    function BRDisplay() {
        var myChart1 = echarts.init(document.getElementById('chartreader'));
        var xAxisData = [];
        var data1 = [];
        var data2 = [];

        for (var i = 0; i < 24; i++) {
            xAxisData.push(i + ":00");
            data1.push((Math.random() * 2).toFixed(2));
            data2.push(-Math.random().toFixed(2));
        }

        var itemStyle = {
            normal: {
                color: "#4fc0f5",
                label: {
                    show: true
                }
            },
            emphasis: {
                barBorderWidth: 1,
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                shadowColor: 'rgba(0,0,0,0.5)'
            }
        };

        var itemStyle1 = {
            normal: {
                color: "#0c4c7c",
                label: {
                    show: true
                }
            },
            emphasis: {
                barBorderWidth: 1,
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                shadowColor: 'rgba(0,0,0,0.5)'
            }
        };

        option = {
            title: {
                text: '借还书',
                textStyle: {
                    color: "#64879c"
                }
            },
            // backgroundColor: '#eee',
            legend: {
                data: ['借书数量', '还书数量'],
                bottom: 0,
                textStyle: {
                    color: "#FFFFFF"
                }
            },
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                    label: {
                        backgroundColor: '#6a7985'
                    }
                }
            },
            grid: {
                show: true
            },
            xAxis: {
                data: xAxisData,
                name: 'X Axis',
                silent: false,
                axisLine: {
                    onZero: true
                },
                splitLine: {
                    show: false
                },
                splitArea: {
                    show: false
                },
                axisLine: {
                    lineStyle: {
                        color: '#95a7c5' //设置x轴颜色
                    }
                },
                axisLabel: {
                    rotate: 40,
                    interval: '0',
                    // textStyle:{
                    //     color:'#FFFFFF'
                    // }
                },
            },
            yAxis: {
                splitArea: {
                    show: false
                },
                // axisLabel: {
                //     textStyle: {
                //         color: '#FFFFFF'
                //     }
                // },
                axisLine: {
                    lineStyle: {
                        color: '#95a7c5' //设置x轴颜色
                    }
                },
                // axisLine:{
                //     show:false
                // },
            },
            grid: {
                left: 30
            },
            series: [{
                    name: '借书数量',
                    type: 'bar',
                    stack: 'one',
                    itemStyle: itemStyle,
                    data: data1,
                },
                {
                    name: '还书数量',
                    type: 'bar',
                    stack: 'one',
                    itemStyle: itemStyle1,
                    data: data2
                }
            ]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart1.setOption(option);
    }

    //出入馆 5
    function BRDisplay2() {
        var myChart5 = echarts.init(document.getElementById('entrance'));
        var xAxisData = [];
        for (var i = 0; i < 24; i++) {
            xAxisData.push(i + ":00");
        }

        option = {
            title: {
                text: '实时出入馆数据',
                textStyle: {
                    color: "#0be1d9",
                },
                padding: [5, 5, 5, 38]
            },
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                    crossStyle: {
                        color: '#999'
                    }
                }
            },
            legend: {
                // data:['入馆人次','出馆人次','在馆人数'],
                data: [{
                        name: '入馆人次',
                        icon: 'roundRect'
                    },
                    {
                        name: '出馆人次',
                        icon: 'roundRect'
                    },
                    {
                        name: '在馆人数',
                    }
                ],
                textStyle: {
                    color: '#fff'
                },
                top: 'bottom',
                left: 'center'
            },
            xAxis: [{
                type: 'category',
                data: xAxisData,
                axisPointer: {
                    type: 'shadow'
                },
                axisLine: {
                    lineStyle: {
                        color: '#95a7c5' //设置x轴颜色
                    }
                }
            }],
            yAxis: [{
                    type: 'value',
                    name: '入馆/出馆',
                    min: 0,
                    max: 250,
                    interval: 50,
                    axisLabel: {
                        formatter: '{value}'
                    },
                    axisLine: {
                        lineStyle: {
                            color: '#95a7c5' //设置图形右侧颜色
                        }
                    }
                },
                {
                    type: 'value',
                    name: '在馆',
                    min: 0,
                    max: 25,
                    interval: 5,
                    axisLine: {
                        lineStyle: {
                            color: '#95a7c5' //设置图形右侧颜色
                        }
                    },
                    axisLabel: {
                        formatter: '{value}'
                    }
                }
            ],
            series: [{
                    name: '入馆人次',
                    type: 'line',
                    showSymbol: false,
                    // markPoint: {
                    //     data: [
                    //         {type: 'max', name: '最大值'},
                    //         {type: 'min', name: '最小值'}
                    //     ]
                    // },
                    itemStyle: {
                        normal: {
                            color: "#e9e343"
                        }
                    },
                    lineStyle: {
                        normal: {
                            opacity: 0
                        }
                    },
                    areaStyle: {
                        normal: {
                            color: "#e9e343",
                            opacity: 0.6
                        },
                        shadowColor: '#e9e343'
                    },
                    //data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3,2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
                    //data:[2.13045122701812,5.88074246789687,10.8687244362494,27.7490680369161,29.9927650487975,80.2654823059371,137.102734954229,166.505699471946,36.9587081124997,20.4998605663758,10.4593727440172,5.81027733087063,3.44277662201962,6.79602054371483,10.0146375428914,23.4210573311462,28.3844354488915,79.0378503662378,137.121123644647,164.869388351143,34.9850049777217,21.0565940047002,8.09423787734218,4.55105555850261]
                    //data:[4.99964063287791,5.99723220945553,11.2806040846823,25.9943686048015,28.2666012814555,79.725598341279,136.93670919435,166.423466252901,34.5234359859855,22.3269532419586,9.21023720436708,7.90960807667837,2.52547873969943,7.61774226338707,9.97663648376149,25.6088146765986,29.3107539127375,79.9482586514843,138.69001558187,166.439343489162,35.1688586796996,22.5803122111497,9.64919739654863,4.91885164758185]	
                    //data:[2.36661923307719,5.09763028919657,7.61903489687556,23.8140046519887,26.3168776032266,77.5990193400982,136.158724392696,162.345711764066,32.6098649256592,20.8524546154967,6.94264119781489,3.76853155913905,2.46233438518574,5.55268484763287,7.61088418117512,24.0006273587644,26.2955294784298,77.0982992503562,136.44362230776,163.117260278753,32.6868097252693,20.1466842906336,6.95098572260595,3.52353617671735]	
                    //data:[2.1226888263282,5.51720625464694,7.80975173412968,24.0977129027948,26.2661071834586,76.7568829699391,136.045643069419,163.009847587428,33.3084339793699,20.5462719117592,7.15490015074785,3.80309941254397,2.44672307692743,5.29709017074087,7.59165853354765,24.1401960980518,26.3664562415854,77.3022015887002,136.019877606884,162.899526194372,32.8223927141821,20.958665642185,7.25866525411192,4.06098754595995]	
                    data: [2.51585300085092, 5.64185512816406, 7.93212494995391, 23.510047428663, 26.1869231544188, 77.0499093509466, 135.77201117154, 162.278824502889, 33.1264448951598, 20.6476330309708, 6.5791439592956, 3.93628354698573, 2.67901607977068, 5.26676192625268, 7.11564640936391, 23.6836342493133, 26.3848547987092, 77.6336501701289, 136.594237086609, 162.358395519185, 33.4118021393012, 20.7467564588305, 6.6301905472828, 3.34843606259897]
                    //data:[2.38012737152791,5.25942940923939,7.02538758200941,23.9633510450056,26.2492582907403,77.5924869265119,136.155291725003,162.698084040324,32.9301079024856,20.2481599381305,6.80606403638337,3.89884576518163,2.28653236235597,5.24739395984742,7.39982444872929,23.5688096181848,25.7239815020036,77.2789869987849,136.309185652695,163.183703420686,32.697369171719,20.05814135068,6.87296762171454,3.81597931452426]

                },
                {
                    name: '出馆人次',
                    type: 'line',
                    showSymbol: false,
                    // markPoint: {
                    //     data: [
                    //         {type: 'max', name: '最大值'},
                    //         {type: 'min', name: '最小值'}
                    //     ]
                    // },
                    lineStyle: {
                        normal: {
                            opacity: 0
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: "#b27139"
                        }
                    },
                    areaStyle: {
                        normal: {
                            color: "#b27139",
                            opacity: 0.6
                        },
                        shadowColor: '#b27139'
                    },
                    //data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3,2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
                    //data:[2.89376153747438,9.26158445856982,12.5779405280959,29.4201686508193,29.8234611171066,73.0060750514223,175.756770111589,185.113454610512,53.2822690448115,20.2737443747649,10.1546022485774,3.91636867520931,5.90734994971075,6.27786701109557,9.53736079675246,27.0909199298755,32.9142847331112,72.0381917115233,177.044003195672,183.938678404266,49.1958433488215,23.5721162019785,9.48975915546358,3.08383814765834]	
                    //data:[4.67367519296519,10.2020008338299,12.2245936519381,27.2744648947219,29.7284499328971,73.2889502170541,176.057354780548,182.919349903115,52.5848478583159,22.801862280292,9.64289345093181,4.89267717529926,4.75410597749872,6.82798098138607,10.2148837220394,26.4656190191501,33.0251575806763,71.0227364245228,178.056756847593,183.85640475094,49.2155402121651,21.3491615875904,9.25346969704592,4.12385389101488]	
                    //data:[4.02911547551075,6.44727185623347,10.4251507771352,27.1643852481594,31.6729684690456,71.0307836853046,180.065758585814,183.208471323721,52.3747050765835,21.5384428590921,9.49130998476353,3.6002485218141,2.93857542579347,10.3860601004554,11.8609800782189,30.9640253112795,31.6626171370881,72.44831431369,178.915568969987,184.74307167995,49.302191398085,23.0018743054759,7.27267040520703,2.31925603587066]	
                    //data:[5.45513292937181,7.19063232848959,10.8041517490021,27.9570989911943,29.460055945184,73.4360742039228,176.375155774076,184.664309289118,48.9859894176176,19.7800809554638,8.53356653212712,4.30309571580192,4.13581308271445,6.36050384477885,12.8270395721151,29.5575017484378,29.2493980972007,73.8315581652207,176.495718380947,185.811281844211,51.324679331239,21.1442616944669,9.66686396713805,4.86138312956554]	
                    data: [4.21953283521614, 8.26127568064271, 11.3308529790173, 29.0864785554732, 29.0893258228976, 71.845116330936, 179.55507911255, 183.608506059833, 52.4712150243397, 19.839805307121, 7.42214627900895, 3.08969752732002, 3.78537921227882, 7.91483843152093, 12.637223780039, 26.6848047145367, 29.6347024713112, 74.0670987565905, 179.166209811881, 186.500249447507, 49.6420187323372, 19.8166715264137, 7.12524635279756, 6.48437852858435]
                    //data:[3.73053761129344,7.79744722503581,12.6589007283218,30.7591420690444,30.2317081691017,71.8871933883193,178.639942209357,183.674836288885,50.6501762094011,19.7964375726809,10.8782014017512,7.10226909419799,7.50862935429303,5.91067273825333,11.8247419227785,30.6849202364272,29.0258122993633,74.228974235687,178.326566012546,182.477351418385,49.6932721019615,20.1100729266525,10.3038234830764,3.70018070603456]

                },
                {
                    name: '在馆人数',
                    type: 'line',
                    smooth: true,
                    symbolSize: 10,
                    yAxisIndex: 1,
                    // markPoint: {
                    //     data: [
                    //         {type: 'max', name: '最大值'},
                    //         {type: 'min', name: '最小值'}
                    //     ]
                    // },
                    itemStyle: {
                        normal: {
                            color: "#4fc0f5"
                        }
                    },
                    //data:[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2,2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
                    //data:[2.6247544982058,3.5355043493812,4.27183650643007,4.88770735636432,7.12203660951138,15.0928573468233,18.4024512781316,24.7431683331074,24.7863242729824,20.1610568761315,15.9014830669538,7.53352914989338,5.63471879401713,7.166139541814,3.60166901684662,8.59446171062817,7.80625599177134,14.1090240304378,22.1524909393801,24.4428038444837,24.0123883397764,17.7798530061279,12.3501970151659,8.27695912685829]	
                    //data:[4.7023472268383,7.15699415136123,4.77914303938537,6.76797858856872,10.4511993210352,14.2369834638719,22.4593614399454,24.0426400103582,23.3888093079052,17.9369203064284,13.5334478595095,11.1061015308691,6.35963184334917,3.42504582708881,6.4953119250386,6.15382484788823,7.49996753864424,11.7290389970475,24.5731275438936,24.1201517707386,24.28255611059,20.135199928615,15.9827533056943,10.6309714530803]	
                    //data:[3.396676724596,3.36699147148172,6.83344230136339,5.96767651793428,7.12032457408841,11.1818920673536,21.9953548746732,24.489737214278,23.5351361655077,17.5950740489701,12.9679306438652,10.8637035754659,4.75587610630334,6.23280604202322,4.51380795386174,4.83256487987285,7.64213536415136,13.1846868530618,24.8501040624466,23.9865833736365,23.2008543498381,20.7206193012835,14.7190033498035,8.28646241460135]	
                    //data:[3.25783580520423,7.11612604923578,3.61754153542088,9.40566746320074,7.63853334753955,14.735258400441,20.3555829936355,23.5004501997083,23.1847853115596,18.4326801469397,12.3759485072581,8.51835220123396,4.18330539545125,6.15694906316495,7.11877823590775,6.13842024696989,7.21912702339511,13.5322776637306,20.8409947270401,24.201765761049,24.7914364867775,19.1131488812439,12.7673517238426,10.4869843463644]	
                    data: [4.66739587924759, 3.84848098665567, 6.83824498820422, 8.50754183627535, 6.89063779067138, 14.9207473520083, 23.6439149303369, 23.5833842862379, 23.1192836278873, 17.1736428112884, 14.6384636633437, 10.2882462554479, 4.74449650266233, 5.1285958343605, 3.35892352531607, 6.11371799061648, 7.2461872968936, 12.6396901777231, 23.4279259285813, 24.8443348154214, 23.8988469043166, 19.0043489833815, 12.7076768965034, 10.2354280749135]
                    //data:[3.2351315749487,3.40815476779887,4.34210448521966,9.15600930066281,6.46520375931862,14.5434718779734,23.1606677816519,24.959834646632,24.5993677298721,16.9659289370399,13.5578242185197,8.33588943449169,2.11370483111912,5.95218044792698,6.91312438794019,7.47410595095905,8.74710761052559,10.4499363315892,21.1849975047367,23.7586433642058,25.01099056011,20.1929488330399,12.7861924113184,7.43882273655725]

                }
            ]
        };
        myChart5.setOption(option);
    }

    //出入馆 5
    function borrow() {
        var myChart6 = echarts.init(document.getElementById('borrow'));

        var hours = ['0', '1', '2', '3', '4', '5', '6',
            '7', '8', '9', '10', '11',
            '12', '13', '14', '15', '16', '17',
            '18', '19', '20', '21', '22', '23'
        ];
        var days = ['0', '10 ', '20',
            '30', '40', '50', '60'
        ];

        var data = [
            [0, 0, 5, "书名demo1"],
            [0, 1, 1, "书名demo2"],
            [0, 2, 0, "书名demo3"],
            [0, 3, 0, "书名demo"],
            [0, 4, 0, "书名demo"],
            [0, 5, 0, "书名demo"],
            [0, 6, 0, "书名demo4"],
            [0, 7, 0, "书名demo"],
            [0, 8, 0, "书名demo8"],
            [0, 9, 0, "书名demo"],
            [0, 10, 0, "书名demo"],
            [0, 11, 2, "书名demo"],
            [0, 12, 4, "书名demo"],
            [0, 13, 1, "书名demo"],
            [0, 14, 1, "书名demo"],
            [0, 15, 3, "书名demo"],
            [0, 16, 4, "书名demo"],
            [0, 17, 6, "书名demo"],
            [0, 18, 4, "书名demo"],
            [0, 19, 4, "书名demo"],
            [0, 20, 3, "书名demo"],
            [0, 21, 3, "书名demo"],
            [0, 22, 2, "书名demo"],
            [0, 23, 5, "书名demo"],
            [1, 0, 7, "书名demo"],
            [1, 1, 0, "书名demo"],
            [1, 2, 0, "书名demo"],
            [1, 3, 0, "书名demo"],
            [1, 4, 0, "书名demo"],
            [1, 5, 0, "书名demo"],
            [1, 6, 0, "书名demo"],
            [1, 7, 0, "书名demo"],
            [1, 8, 0, "书名demo"],
            [1, 9, 0, "书名demo"],
            [1, 10, 5, "书名demo"],
            [1, 11, 2, "书名demo"],
            [1, 12, 2, "书名demo"],
            [1, 13, 6, "书名demo"],
            [1, 14, 9, "书名demo"],
            [1, 15, 11, "书名demo"],
            [1, 16, 6, "书名demo"],
            [1, 17, 7, "书名demo"],
            [1, 18, 8, "书名demo"],
            [1, 19, 12, "书名demo"],
            [1, 20, 5, "书名demo"],
            [1, 21, 5, "书名demo"],
            [1, 22, 7, "书名demo"],
            [1, 23, 2, "书名demo"],
            [2, 0, 1, "书名demo"],
            [2, 1, 1, "书名demo"],
            [2, 2, 0, "书名demo"],
            [2, 3, 0, "书名demo"],
            [2, 4, 0, "书名demo"],
            [2, 5, 0, "书名demo"],
            [2, 6, 0, "书名demo"],
            [2, 7, 0, "书名demo"],
            [2, 8, 0, "书名demo"],
            [2, 9, 0, "书名demo"],
            [2, 10, 3, "书名demo"],
            [2, 11, 2, "书名demo"],
            [2, 12, 1, "书名demo"],
            [2, 13, 9, "书名demo"],
            [2, 14, 8, "书名demo"],
            [2, 15, 10, "书名demo"],
            [2, 16, 6, "书名demo"],
            [2, 17, 5, "书名demo"],
            [2, 18, 5, "书名demo"],
            [2, 19, 5, "书名demo"],
            [2, 20, 7, "书名demo"],
            [2, 21, 4, "书名demo"],
            [2, 22, 2, "书名demo"],
            [2, 23, 4, "书名demo"],
            [3, 0, 7, "书名demo"],
            [3, 1, 3, "书名demo"],
            [3, 2, 0, "书名demo"],
            [3, 3, 0, "书名demo"],
            [3, 4, 0, "书名demo"],
            [3, 5, 0, "书名demo"],
            [3, 6, 0, "书名demo"],
            [3, 7, 0, "书名demo"],
            [3, 8, 1, "书名demo"],
            [3, 9, 0, "书名demo"],
            [3, 10, 5, "书名demo"],
            [3, 11, 4, "书名demo"],
            [3, 12, 7, "书名demo"],
            [3, 13, 14, "书名demo"],
            [3, 14, 13, "书名demo"],
            [3, 15, 12, "书名demo"],
            [3, 16, 9, "书名demo"],
            [3, 17, 5, "书名demo"],
            [3, 18, 5, "书名demo"],
            [3, 19, 10, "书名demo"],
            [3, 20, 6, "书名demo"],
            [3, 21, 4, "书名demo"],
            [3, 22, 4, "书名demo"],
            [3, 23, 1, "书名demo"],
            [4, 0, 1, "书名demo"],
            [4, 1, 3, "书名demo"],
            [4, 2, 0, "书名demo"],
            [4, 3, 0, "书名demo"],
            [4, 4, 0, "书名demo"],
            [4, 5, 1, "书名demo"],
            [4, 6, 0, "书名demo"],
            [4, 7, 0, "书名demo"],
            [4, 8, 0, "书名demo"],
            [4, 9, 2, "书名demo"],
            [4, 10, 4, "书名demo"],
            [4, 11, 4, "书名demo"],
            [4, 12, 2, "书名demo"],
            [4, 13, 4, "书名demo"],
            [4, 14, 4, "书名demo"],
            [4, 15, 14, "书名demo"],
            [4, 16, 12, "书名demo"],
            [4, 17, 1, "书名demo"],
            [4, 18, 8, "书名demo"],
            [4, 19, 5, "书名demo"],
            [4, 20, 3, "书名demo"],
            [4, 21, 7, "书名demo"],
            [4, 22, 3, "书名demo"],
            [4, 23, 0, "书名demo"],
            [5, 0, 2, "书名demo"],
            [5, 1, 1, "书名demo"],
            [5, 2, 0, "书名demo"],
            [5, 3, 3, "书名demo"],
            [5, 4, 0, "书名demo"],
            [5, 5, 0, "书名demo"],
            [5, 6, 0, "书名demo"],
            [5, 7, 0, "书名demo"],
            [5, 8, 2, "书名demo"],
            [5, 9, 0, "书名demo"],
            [5, 10, 4, "书名demo"],
            [5, 11, 1, "书名demo"],
            [5, 12, 5, "书名demo"],
            [5, 13, 10, "书名demo"],
            [5, 14, 5, "书名demo"],
            [5, 15, 7, "书名demo"],
            [5, 16, 11, "书名demo"],
            [5, 17, 6, "书名demo"],
            [5, 18, 0, "书名demo"],
            [5, 19, 5, "书名demo"],
            [5, 20, 3, "书名demo"],
            [5, 21, 4, "书名demo"],
            [5, 22, 2, "书名demo"],
            [5, 23, 0, "书名demo"],
            [6, 0, 1, "书名demo"],
            [6, 1, 0, "书名demo"],
            [6, 2, 0, "书名demo"],
            [6, 3, 0, "书名demo"],
            [6, 4, 0, "书名demo"],
            [6, 5, 0, "书名demo"],
            [6, 6, 0, "书名demo"],
            [6, 7, 0, "书名demo"],
            [6, 8, 0, "书名demo"],
            [6, 9, 0, "书名demo"],
            [6, 10, 1, "书名demo"],
            [6, 11, 0, "书名demo"],
            [6, 12, 2, "书名demo"],
            [6, 13, 1, "书名demo"],
            [6, 14, 3, "书名demo"],
            [6, 15, 4, "书名demo"],
            [6, 16, 0, "书名demo"],
            [6, 17, 0, "书名demo"],
            [6, 18, 0, "书名demo"],
            [6, 19, 0, "书名demo"],
            [6, 20, 1, "书名demo"],
            [6, 21, 2, "书名demo"],
            [6, 22, 2, "书名demo"],
            [6, 23, 6, "书名demo"]
        ];
        option = {
            title: {
                text: '实时借阅数据',
                textStyle: {
                    color: "#64879c"
                }
            },
            legend: {
                data: ['借阅数据'],
                left: 'right',
                textStyle: {
                    color: "#64879c"
                }
            },
            polar: {},
            tooltip: {
                formatter: function (params) {
                    return hours[params.value[1]] + ":" + days[params.value[0]] + params.value[3];
                }
            },
            angleAxis: {
                type: 'category',
                data: hours,
                boundaryGap: false,
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: '#999',
                        type: 'dashed'
                    }
                },
                axisLine: {
                    lineStyle: {
                        color: '#95a7c5' //设置图形右侧颜色
                    },
                    show: false
                }
                // axisLine: {
                //     show: false
                // }
            },
            radiusAxis: {
                type: 'category',
                data: days,
                axisLine: {
                    lineStyle: {
                        color: '#95a7c5' //设置图形右侧颜色
                    },
                    show: false
                },
                axisLabel: {
                    rotate: 45
                }
            },
            series: [{
                name: '借阅数据',
                type: 'scatter',
                coordinateSystem: 'polar',
                symbolSize: function (val) {
                    return val[2] * 2;
                },
                label: {
                    normal: {
                        show: true,
                        formatter: function (param) {
                            var myDate = new Date();
                            var h = myDate.getHours();
                            if (hours[param.value[1]] == h)
                                return param.value[3]
                            else
                                return ""
                        }
                    }
                },
                itemStyle: {
                    normal: {
                        color: "#4fc0f5"
                    }
                },
                data: data,
                animationDelay: function (idx) {
                    return idx * 5;
                }
            }]
        };
        myChart6.setOption(option);
    }
    //借还总册次 6
    function BRCount() {
        var et = window.localStorage["et"];
        var backServerUrl = window.localStorage["backServerUrl"];
        var now = new Date().format("yyyy-MM-dd");
        var startTime = "2017-01-01";
        var endTime = now;
        var interval = "1y";
        $.ajax({
            type: "get",
            url: backServerUrl + "api/statistics/jh?start=" + startTime + "T00:00:00.001&end=" + endTime + "T23:59:59.001&interval=" + interval + "&device_alias=&source=false&aggregation=operation__datetime",
            dataType: "json",
            headers: {
                'Content-Type': 'application/json',
                'Authorization': et
            },
            success: function (data) {
                var tableCount = "";
                var sfdata = null;
                var dhdata = "";
                var xCategories = [];
                var returnData = [];
                var borrowData = [];
                var renewData = [];
                var countDeviceHeader = "";
                var bu = data.aggregations.operation.buckets;

                if (bu.length > 0) {
                    var jh = "";
                    var jhstime = "";
                    var jhetime = "";
                    for (var i in bu[0].datetime.buckets) {
                        var tdataBorrow = "";
                        var tdataReturn = "";
                        var tdataRenew = "";
                        var countBorrow = 0;
                        var countReturn = 0;
                        for (var j = 0; j < bu.length; j++) {
                            switch (bu[j].key) {
                                case "borrow":
                                    // borrowData.push(bu[j].datetime.buckets[i].doc_count);
                                    countBorrow += bu[j].datetime.buckets[i].doc_count;
                                    // tdataBorrow = "<td style='text-align: right;'><a href='javascript:void(0);' onclick='DisplayJHDetails(\"" + jhstime + "\",\"" + jhetime + "\",\"" + selectedDevice + "\",\"\",\"\",\"" + bu[j].key + "\",\"\");'>" + bu[j].datetime.buckets[i].doc_count + "</a></td>";
                                    break;
                                case "return":
                                    // returnData.push(-bu[j].datetime.buckets[i].doc_count);
                                    countReturn += bu[j].datetime.buckets[i].doc_count;
                                    // tdataReturn = "<td style='text-align: right;'><a href='javascript:void(0);' onclick='DisplayJHDetails(\"" + jhstime + "\",\"" + jhetime + "\",\"" + selectedDevice + "\",\"\",\"\",\"" + bu[j].key + "\",\"\");'>" + bu[j].datetime.buckets[i].doc_count + "</a></td>";
                                    break;
                                case "renew":
                                    // renewData.push(bu[j].datetime.buckets[i].doc_count);
                                    // tdataRenew = "<td style='text-align: right;'><a href='javascript:void(0);' onclick='DisplayJHDetails(\"" + jhstime + "\",\"" + jhetime + "\",\"" + selectedDevice + "\",\"\",\"\",\"" + bu[j].key + "\",\"\");'>" + bu[j].datetime.buckets[i].doc_count + "</a></td>";
                                    break;
                            }
                        }
                    }
                    $(".countborrow").html(countBorrow);
                    $(".countreturn").html(countReturn);
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                //当前状态(readyState),0-未初始化，1-正在载入，2-已经载入，3-数据进行交互，4-完成
                alert("PaperCount 请求产生错误!\n" + "status = " + XMLHttpRequest.status + "\nstatusText = " + XMLHttpRequest.statusText + "\nreadyState = " + XMLHttpRequest.readyState + "\nresponseText = " + XMLHttpRequest.responseText);
            }
        });
    }

    //出入馆 5
    function InforShow() {
        var myChart7 = echarts.init(document.getElementById('infor'));

        option = {
            tooltip: {
                formatter: "{a} <br/>{c}"
            },
            series: [{
                    name: '入馆人数',
                    type: 'gauge',
                    min: 0,
                    max: 33000,
                    splitNumber: 11,
                    radius: '50%',
                    axisLine: { // 坐标轴线
                        lineStyle: { // 属性lineStyle控制线条样式
                            color: [
                                [0.09, 'lime'],
                                [0.82, '#1e90ff'],
                                [1, '#ff4500']
                            ],
                            width: 3,
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    axisLabel: { // 坐标轴小标记
                        textStyle: { // 属性lineStyle控制线条样式
                            fontWeight: 'bolder',
                            color: '#fff',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    axisTick: { // 坐标轴小标记
                        length: 15, // 属性length控制线长
                        lineStyle: { // 属性lineStyle控制线条样式
                            color: 'auto',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    splitLine: { // 分隔线
                        length: 25, // 属性length控制线长
                        lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
                            width: 3,
                            color: '#fff',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    pointer: { // 分隔线
                        shadowColor: '#fff', //默认透明
                        shadowBlur: 5
                    },
                    title: {
                        offsetCenter: [0, '-140%'],
                        textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                            // fontWeight: 'bolder',
                            fontSize: 60,
                            fontStyle: 'italic',
                            color: '#fff',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10,
                            fontSize: 40
                        }
                    },
                    detail: {
                        // backgroundColor: 'rgba(30,144,255,0.8)',
                        // borderWidth: 1,
                        // borderColor: '#fff',
                        // shadowColor : '#fff', //默认透明
                        shadowBlur: 5,
                        offsetCenter: [0, '90%'], // x, y，单位px
                        textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                            fontWeight: 'bolder',
                            color: '#acff48',
                            fontSize: 70
                        }
                    },
                    data: [{
                        value: 3000,
                        name: '入馆人数'
                    }]
                },
                {
                    name: '借书总量',
                    type: 'gauge',
                    center: ['22%', '50%'], // 默认全局居中
                    radius: '40%', //控制大小
                    endAngle: 60,
                    min: 0,
                    max: 700,
                    splitNumber: 7,
                    axisLine: { // 坐标轴线
                        lineStyle: { // 属性lineStyle控制线条样式
                            color: [
                                [0.29, 'lime'],
                                [0.86, '#1e90ff'],
                                [1, '#ff4500']
                            ],
                            width: 2,
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    axisLabel: { // 坐标轴小标记
                        textStyle: { // 属性lineStyle控制线条样式
                            fontWeight: 'bolder',
                            color: '#fff',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    axisTick: { // 坐标轴小标记
                        length: 12, // 属性length控制线长
                        lineStyle: { // 属性lineStyle控制线条样式
                            color: 'auto',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    splitLine: { // 分隔线
                        length: 20, // 属性length控制线长
                        lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
                            width: 3,
                            color: '#fff',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    pointer: {
                        width: 5,
                        shadowColor: '#fff', //默认透明
                        shadowBlur: 5
                    },
                    title: {
                        offsetCenter: [0, '-120%'], // x, y，单位px
                        textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                            // fontWeight: 'bolder',
                            fontStyle: 'italic',
                            color: '#fff',
                            // shadowColor : '#fff', //默认透明
                            shadowBlur: 10,
                            fontSize: 40,
                        },
                        textAlign: 'left',
                        padding: 10
                    },
                    detail: {
                        //backgroundColor: 'rgba(30,144,255,0.8)',
                        // borderWidth: 1,
                        borderColor: '#fff',
                        shadowColor: '#fff', //默认透明
                        shadowBlur: 5,
                        width: 80,
                        height: 30,
                        offsetCenter: [-15, '190%'], // x, y，单位px
                        textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                            fontWeight: 'bolder',
                            color: '#acff48',
                            fontSize: 70
                        }
                    },
                    data: [{
                        value: 326,
                        name: '借书总量'
                    }]
                },
                {
                    name: '还书总量',
                    type: 'gauge',
                    center: ['78%', '50%'], // 默认全局居中
                    radius: '40%', //控制大小
                    startAngle: 120,
                    min: 700,
                    max: 0,
                    splitNumber: 7,
                    axisLine: { // 坐标轴线
                        lineStyle: { // 属性lineStyle控制线条样式
                            color: [
                                [0.29, 'lime'],
                                [0.86, '#1e90ff'],
                                [1, '#ff4500']
                            ],
                            width: 2,
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    axisLabel: { // 坐标轴小标记
                        textStyle: { // 属性lineStyle控制线条样式
                            fontWeight: 'bolder',
                            color: '#fff',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    axisTick: { // 坐标轴小标记
                        length: 12, // 属性length控制线长
                        lineStyle: { // 属性lineStyle控制线条样式
                            color: 'auto',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    splitLine: { // 分隔线
                        length: 20, // 属性length控制线长
                        lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
                            width: 3,
                            color: '#fff',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    pointer: {
                        width: 5,
                        shadowColor: '#fff', //默认透明
                        shadowBlur: 5
                    },
                    title: {
                        offsetCenter: [0, '-120%'], // x, y，单位px
                        textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                            // fontWeight: 'bolder',
                            fontStyle: 'italic',
                            color: '#fff',
                            shadowColor: '#fff', //默认透明
                            shadowBlur: 10,
                            fontSize: 40
                        },
                        textAlign: 'right'
                    },
                    detail: {
                        //backgroundColor: 'rgba(30,144,255,0.8)',
                        // borderWidth: 1,
                        borderColor: '#fff',
                        shadowColor: '#fff', //默认透明
                        shadowBlur: 5,
                        width: 80,
                        height: 30,
                        offsetCenter: [15, '190%'], // x, y，单位px
                        textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                            fontWeight: 'bolder',
                            color: '#acff48',
                            fontSize: 70
                        }

                    },
                    data: [{
                        value: 326,
                        name: '还书总量'
                    }]
                }
            ]
        };
        window.onresize = myChart7.resize;

        myChart7.setOption(option);
    }

    function CategoryDisplay() {
        var myChart4 = echarts.init(document.getElementById('chartCategory'));

        option = {
            // title: {
            //     text: '阅读指数分析',
            //     textStyle:{
            //         color:"#64879c"
            //     }
            // },
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                x: 'left',
                // top:'bottom',
                // left:'center',
                textStyle: {
                    color: "#FFFFFF"
                },
                data: ['其它', '书法', '绘画技能', '中国绘画作品', '青年文学', '小说', '儿童文学', '散文']
            },
            grid: {
                top: -80,
                bottom: 0,
            },
            color: ['#6fe0fa', '#ffdb5d', '#b06f30', '#196cd4', '#1A6295', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'],
            series: [{
                name: '阅读指数',
                type: 'pie',
                radius: ['34%', '50%'],
                center: ['60%', '40%'],
                label: {
                    normal: {
                        textStyle: {
                            color: "#ffffff"
                        }
                    }
                },
                data: [{
                        value: 335,
                        name: '其它'
                    },
                    {
                        value: 310,
                        name: '书法'
                    },
                    {
                        value: 234,
                        name: '绘画技能'
                    },
                    {
                        value: 135,
                        name: '中国绘画作品'
                    },
                    {
                        value: 1048,
                        name: '青年文学'
                    },
                    {
                        value: 251,
                        name: '小说'
                    },
                    {
                        value: 147,
                        name: '儿童文学'
                    },
                    {
                        value: 102,
                        name: '散文'
                    }
                ]
            }]
        };

        // option = {
        //     // title: {
        //     //     text: '阅读指数分析',
        //     //     textStyle:{
        //     //         color:"#64879c"
        //     //     }
        //     // },
        //     tooltip : {
        //         trigger: 'axis',
        //         axisPointer : {            // 坐标轴指示器，坐标轴触发有效
        //             type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
        //         }
        //     },
        //     legend: {
        //         data: ['书法', '绘画技巧','文学','艺术','其它'],
        //         top: 'bottom',
        //         left: 'center',
        //         textStyle:{
        //             color:"#ffffff"
        //         }
        //     },
        //     grid: {
        //         left: '3%',
        //         containLabel: true
        //     },
        //     xAxis:  {
        //         type: 'value',
        //         axisLine: {
        //             lineStyle: {
        //                 color: '#95a7c5'//设置图形右侧颜色
        //             }
        //         }
        //     },
        //     yAxis: {
        //         type: 'category',
        //         axisLine: {
        //             lineStyle: {
        //                 color: '#95a7c5'//设置图形右侧颜色
        //             }
        //         },
        //         data: ['周一','周二','周三','周四','周五','周六','周日']
        //     },
        //     series: [
        //         {
        //             name: '书法',
        //             type: 'bar',
        //             stack: '总量',
        //             label: {
        //                 normal: {
        //                     show: true,
        //                     position: 'insideRight'
        //                 }
        //             },
        //             data: [320, 302, 301, 334, 390, 330, 320]
        //         },
        //         {
        //             name: '绘画技巧',
        //             type: 'bar',
        //             stack: '总量',
        //             label: {
        //                 normal: {
        //                     show: true,
        //                     position: 'insideRight'
        //                 }
        //             },
        //             data: [120, 132, 101, 134, 90, 230, 210]
        //         },
        //         {
        //             name: '文学',
        //             type: 'bar',
        //             stack: '总量',
        //             label: {
        //                 normal: {
        //                     show: true,
        //                     position: 'insideRight'
        //                 }
        //             },
        //             data: [220, 182, 191, 234, 290, 330, 310]
        //         },
        //         {
        //             name: '艺术',
        //             type: 'bar',
        //             stack: '总量',
        //             label: {
        //                 normal: {
        //                     show: true,
        //                     position: 'insideRight'
        //                 }
        //             },
        //             data: [150, 212, 201, 154, 190, 330, 410]
        //         },
        //         {
        //             name: '其它',
        //             type: 'bar',
        //             stack: '总量',
        //             label: {
        //                 normal: {
        //                     show: true,
        //                     position: 'insideRight'
        //                 }
        //             },
        //             data: [820, 832, 901, 934, 1290, 1330, 1320]
        //         }
        //     ]
        // };
        myChart4.setOption(option);
    }

    function getLastDay(year, month) {
        var new_year = year; //取当前的年份
        var new_month = month++; //取下一个月的第一天，方便计算（最后一天不固定）
        if (month > 12) {
            new_month -= 12; //月份减
            new_year++; //年份增
        }
        var new_date = new Date(new_year, new_month, 1); //取当年当月中的第一天
        return (new Date(new_date.getTime() - 1000 * 60 * 60 * 24)).getDate(); //获取当月最后一天日期
    }
    //入馆人数柱状图 4
    function FlowCount() {
        var myChart = echarts.init(document.getElementById('flowchart'));
        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '入馆人次',
                textStyle: {
                    color: "#64879c"
                }
            },
            tooltip: {},
            legend: {
                bottom: 0,
                data: ['入馆人次'],
                show: true,
                textStyle: {
                    color: "#FFFFFF"
                }
            },
            xAxis: {
                axisLine: {
                    lineStyle: {
                        color: '#95a7c5'
                    }
                },
                axisLabel: {
                    rotate: 40,
                    interval: '0',
                    // textStyle:{
                    //     color:'#FFFFFF'
                    // }
                },
                data: ["04-01", "04-02", "04-03", "04-04", "04-05", "04-06", "04-07", "04-08", "04-09", "04-10", "04-11", "04-12", "04-13", "04-14", "04-15", "04-16", "04-17", "04-18", "04-19", "04-20", "04-21", "04-22", "04-23", "04-24", "04-25", "04-26", "04-27", "04-28", "04-29", "04-30"]
            },
            yAxis: {
                axisLine: {
                    lineStyle: {
                        color: '#95a7c5' //设置x轴颜色
                    }
                },
                axisLabel: {
                    formatter: '{value}k',
                    // textStyle: {
                    //     color: '#FFFFFF'
                    // }
                }
            },
            series: [{
                itemStyle: {
                    normal: {
                        color: "#4fc0f5"
                    }
                },
                name: '入馆人次',
                type: 'bar',
                data: [1, 2, 3, 10, 10, 20, 0, 0, 1, 2, 3, 10, 10, 20, 0, 0, 1, 2, 3, 10, 10, 20, 0, 0, 1, 2, 3, 10, 10, 20]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    }


    function UpdateBigScreen() {
        // var rootPath = getRootPath();
        // var backServerUrl = "";
        // if(rootPath.substring(7,10) == "192" || rootPath.substring(7,10) == "loc" || rootPath.substring(7,10) == "10.") {
        //    backServerUrl = "http://1.30.233.74:10000/";    //包头
        //    //backServerUrl = "http://10.232.2.51:10000/";    //包头内网
        // }
        // else
        // {
        //     backServerUrl = "http://1.30.233.74:10000/";
        // }
        // window.localStorage["backServerUrl"] = backServerUrl;
        // $.ajax({
        //     type: "POST",
        //     url: backServerUrl + "api/auth/token",
        //     dataType: "json",
        //     headers: {'Content-Type': 'application/json'},
        //     data:JSON.stringify({"username": "shrfid", "password":"111"}),
        //     success: function (data) {
        //         var last=(data.token).toString();
        //         // console.log(last);
        //         window.localStorage["et"] = "Bearer " + last;
        //         BorrowCount();
        //         BRDisplay();
        //         BRDisplay2();
        //         // borrow();
        //         InforShow();
        //         // ReaderCount();
        //         // GetMJWarn();
        //         // GetMJFlow();
        //         // GetMJLastMonthFlow();
        //         // BRCount();
        //         // FlowCount();
        //         CategoryDisplay();
        //         var weather = '<iframe id="weather" name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=83&py=beijing" width="515" height="178" allowtransparency="true" style="background-color: transparent;" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
        //         $("#area2").html(weather);
        //     },
        //     error: function (XMLHttpRequest, textStatus, errorThrown) {
        //         //当前状态(readyState),0-未初始化，1-正在载入，2-已经载入，3-数据进行交互，4-完成
        //         console.log("Token 请求产生错误!\n" + "status = " + XMLHttpRequest.status + "\nstatusText = " + XMLHttpRequest.statusText + "\nreadyState = " + XMLHttpRequest.readyState + "\nresponseText = " + XMLHttpRequest.responseText);
        //     }
        // });
        BorrowCount();
        // BRDisplay();
        BRDisplay2();
        // borrow();
        // InforShow();
        CategoryDisplay();
    }

    function Slide() {
        slideImagesSrc = [];
        slideImagesSrc.push("book_mao.jpg");
        slideImagesSrc.push("book_3t.jpg");
        slideImagesSrc.push("book_lzyz.jpg");
        slideImagesSrc.push("book_etwx.jpg");
        $("#imgmain").attr("src", slideImagesSrc.get(0));
    }

    function InitPage() {
        UpdateBigScreen();
        if (setIntervalID === 0)
            setIntervalID = setInterval("bigscreen.UpdateBigScreen()", 10000);
    }

    return {
        InitPage: InitPage,
        UpdateBigScreen: UpdateBigScreen
    }
}();